import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import index from '@/components/index'
import product from '@/components/product'
import dd from '@/components/dd'
import movies from '@/components/movies'
import movies_xq from '@/components/movies_xq'
import product1 from '@/components/productt/product1'
import product2 from '@/components/productt/product2'
import product3 from '@/components/productt/product3'

Vue.use(Router)

// 到处，方便外部加载
export default new Router({
  mode: 'history',	
  routes: [
    {
      path: '/',
      name: 'index',
      component: index
    },
    {
      path: '/product',
      name: 'product',
      component: product,
      redirect: '/product/product1',
      children:[
          { path: '/product/product1', component: product1},
          { path: '/product/product2', component: product2},
          { path: '/product/product3', component: product3}
      ]
    },
    {
      path: '/dd',
      name: 'dd',
      component: dd
    },
    {
      path: '/movies',
      name: 'movies',
      component: movies
    },
    {
      path: '/movies/movies_xq',
      name: 'movies_xq',
      component: movies_xq
    }
  ]
})
